<template>
  <div id="app">
    <!-- 一级路由 -->
    <!-- {
      path: '/login',
      name: 'Login',
      component: Login
    }, -->
    <keep-alive>
      <router-view v-if="$route.meta.isNeedLive" />
    </keep-alive>
    <router-view v-if="!$route.meta.isNeedLive" />
    <!-- <van-button type="primary">主要按钮</van-button>
<van-button type="info">信息按钮</van-button>
<van-button type="default">默认按钮</van-button>
<van-button type="warning">警告按钮</van-button>
<van-button type="danger">危险按钮</van-button> -->
  </div>
</template>

<style lang="less">
.container {
  border: 1px solid #ddd;
}
</style>
<script>
// import ajax from './utils/request.js';
// import ajax from '@/utils/request.js';
// import {instance2} from '@/utils/request.js';
export default {
  name: "App",
  created() {},
  watch: {
    $route(obj) {
      console.log(obj, "当前的路由信息");
      // 推断出 当$route.meta.isNeedLive === true
    }
  }
};
</script>
